home *** CD-ROM | disk | FTP | other *** search
/ Collection of Tools & Utilities / Collection of Tools and Utilities.iso / dskut / clnfil23.zip / CLEANFIL.DOC next >
Text File  |  1991-02-16  |  17KB  |  468 lines

  1.  
  2.  
  3.                        C L E A N - F I L E S
  4.                        ═════════════════════
  5.  
  6.                (c) Copyright 1990,91 by Klaus Hartnegg,
  7.                       D-7835 Teningen, Germany
  8.  
  9.  
  10.  
  11. Description:
  12. ────────────
  13. Every time DOS writes a file it fills up the last used cluster with some
  14. randomly collected data. CleanFile wipes out this unused data space
  15. without affecting the file itself. This ensures that you don't
  16. inadvertently publish confidential data when giving away some program- 
  17. or data files on diskettes.
  18.  
  19.  
  20.  
  21. New Features?
  22. ─────────────
  23. If you already have an older version of this program you should at least
  24. read the section 'revision history' near the end of this text.
  25.  
  26.  
  27.  
  28. Requirements
  29. ────────────
  30. CleanFile only uses MS-DOS calls to do its work and BIOS for screen
  31. output. It does not use the FAT or any internal data structure of DOS
  32. and should thus run on all types of drives and all versions of DOS from
  33. 3.0 on upwards.
  34.  
  35.  
  36.  
  37. Licence
  38. ───────
  39. This software is provided as-is, without warranty of any kind. The 
  40. author shall not be liable to the user for any direct, indirect or 
  41. consequential loss arising from the use of, or inability to use, any 
  42. program or file howsoever caused. No warranty is given that the software 
  43. will work under all circumstances.
  44.  
  45. This software may be distributed free of charge as long as all files
  46. except the key-file are distributed together. The key-file is proof of
  47. your registration and must not be given to other persons.
  48.  
  49. You may use this program for a 7 day trial period without payment. If
  50. you decide to use it longer than this trial period, you have to pay a
  51. registration fee of $15 (US-$).
  52.  
  53. The registered version may be used either by one person or on one single
  54. computer only.
  55.  
  56.  
  57.  
  58. Background
  59. ──────────
  60. Space on all disks (hard disk or floppy) is split into sectors.
  61. Depending on the size of the disk a sector contains 256, 512 or 1024
  62. characters.  DOS can not write single characters but only complete
  63. sectors. Space on disks used for your files is allocated in even bigger
  64. units: clusters.  A Cluster contains either 2, 4 or 8 sectors.
  65.  
  66. Very little files happen to need an exact multiple of the cluster size.
  67. When writing a file, DOS fills up the rest of the last sector with some
  68. randomly chosen data that happened to be in one of its internal buffers.
  69. The unused sectors of the last cluster simply retain their previous
  70. content. DOS's internal buffers contain data or disk directories that
  71. you worked on just before.
  72.  
  73. Imagine what that means: every time you gave a diskette away you
  74. included some private or maybe even confidential data, that you perhaps 
  75. didn't really want to publish, even when using a freshly formatted 
  76. diskette!
  77.  
  78. You say `nobody can look at this data'? Oh yes, they can! It's in fact
  79. very easy: there are a lot of programs called `sector editors' that
  80. allow doing exactly this. Perhaps the most popular examples for such
  81. programs are Norton's wonderful utilities NU or DISKEDIT. Of course they
  82. were not written to serve this dubious purpose; instead they are 
  83. intended to repair defective disks and do indeed a very good job of 
  84. this.
  85.  
  86.  
  87.  
  88. What CleanFile does
  89. ───────────────────
  90. CleanFile overwrites every character that exist beyond the end of your
  91. files with nulls. CleanFile will not only overwrite the rest of the last
  92. sector but also all unneeded sectors in the last cluster. This will not
  93. affect the content of your file.
  94.  
  95. Please note that CleanFile does not prevent DOS from doing the error
  96. described above. It can only correct the problem after it already
  97. occurred.  Thus it won't help to run CleanFile on the files on your hard
  98. disk that you intend to copy to a disk because the problem arises when
  99. you actually are copying the files. So you'll have to clean all
  100. destination files after every COPY or XCOPY! I am sorry, but that's the
  101. way DOS works!
  102.  
  103. You may want to use CleanFile not only on diskettes but also on hard
  104. disks when several people share a computer. In this case you will need
  105. an additional program to wipe out the completely unused data space too.
  106.  
  107.  
  108.  
  109.  
  110. Usage
  111. ─────
  112. Supply the names of the files and/or directories that shall be cleaned
  113. as parameters on the command-line.
  114.  
  115. You may press Ctrl-Break at any time to abort the processing. CleanFile
  116. will respond with a short beep but will not stop immediately - it has to
  117. close all open files first.
  118.  
  119.  
  120. Syntax : CleanFil [/Options] [filename(s)]
  121.  
  122.  
  123. filename(s):
  124.  
  125.    one ore more names of files and/or directories. Filenames may contain
  126.    wildcard characters '?' and '*'. These wildcards will be handled in
  127.    the usual way, NOT like extended wildcards in filenames that you
  128.    supply after the exclude switch (see below)!
  129.  
  130.    Alternatively CleanFile can read the names of the files and/or
  131.    directories to work on from the standard-input device. To use this
  132.    you should know what redirection of input and output and pipes are.
  133.    Please read your DOS manual for a description of these.
  134.  
  135.  
  136. Options:  (Options can be supplied in any order)
  137.  
  138. /R - recurse into subdirectories (registered versions only!)
  139.  
  140.    This will cause CleanFil to work not only on the files in the current
  141.    or specified directory but also in all subdirectories and in all
  142.    directories within these subdirectories and so on.
  143.  
  144.  
  145. /hid - include hidden files
  146.  
  147.    Cleanfile will process files with the hidden attribute set only when
  148.    you specify this option. Read the section 'possible problems' below
  149.    before using this option!
  150.  
  151.  
  152. /sys - include system files
  153.  
  154.    Cleanfile will process files with the system attribute set only when
  155.    you specify this option. Read the section 'possible problems' below
  156.    before using this option!
  157.  
  158.  
  159. /today - process only files that have been changed today.
  160.  
  161.  
  162. /D<date> - process only files that have been changed at or after the
  163.            specified date.
  164.  
  165.    Run CleanFile without any arguments to find out in which format the 
  166.    date has to be written. The format depends on the country for which 
  167.    your computer has been installed. If the date format is not what you 
  168.    expected then a line is missing or invalid in the file CONFIG.SYS.  
  169.    For example in Germany one has to write 'country = 49,437'. No such 
  170.    redefinition may be necessary in the USA.
  171.  
  172.  
  173. /X<filename> - Exclude all files that match the given filename.
  174.  
  175.    You can supply many filenames separated by blanks if you put the
  176.    whole string into ' or ". Example: cleanfil *.* '/x*.bak /x*.dat'
  177.    This is however not necessary, because you can as well supply the /x
  178.    switch multiple times. There is only one restriction and this is one
  179.    of DOS not of CleanFile: The whole thing has to fit on the command 
  180.    line!
  181.  
  182.    Please note that the wildcard-handling for the exclude switch is a
  183.    very special one: The names of all found files will be expanded to
  184.    full path names including the drive letter and a colon before checking
  185.    against the supplied filenames to be excluded. The filenames you 
  186.    supply may contain wildcard characters: a '?' matches one character 
  187.    or nothing, a '*' matches any string. Important: you can include many 
  188.    '?' and '*' characters!
  189.  
  190.    By the way, I said '*' matches ANY STRING. Is '\COMPILER\TP60' a
  191.    string?  YES! So 'c:*\*.pas' will of course match the filename
  192.    'c:\compiler\tp60\cleanfil.pas'!!
  193.  
  194.    There are two cases handled a bit special to ensure that cleanfile
  195.    always does what you expect. Otherwise these masks would not match
  196.    any file at all:
  197.    1. a mask containing a filename only, no path (i.e. no '\' character)
  198.       will automatically be preceded by '*\'.
  199.    2. a mask starting with '\' will automatically be preceded by '?:'
  200.  
  201.    Some other examples:
  202.  
  203.    this pattern  will match
  204.    *\test.*      all files with name 'test'
  205.    *\test*.*     all files with name starting with 'test'
  206.    *\*test*.*    all files with the string 'test' somewhere in the name!
  207.    test.*        (will be translated to *\test.*, see 1st example!)
  208.    *\temp\*.*    all files in all 'temp' directories